import http from "@/http"
import {SysDictData, SysDictDataListParam} from '@/api/sysDictData/type'

// 新增字典数据
export const addApi = (data: SysDictData) => {
    return http.post("/system/dict/data/insert", data)
}

// 分页获取字典数据列表
export const getListApi = (data: SysDictDataListParam) => {
    return http.get("/system/dict/data/list", data)
}

// 编辑字典数据
export const editApi = (data: SysDictData) => {
    return http.put("/system/dict/data/update", data)
}

// 删除字典数据
export const deleteApi = (dictCode: number) => {
    return http.delete(`/system/dict/data/delete/${dictCode}`)
}
